﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Irvin_Engine.Camera
{
    public class CameraManager
    {
        private static CameraManager m_oInstance = null;

        private Dictionary<string,Camera> Cameras = new Dictionary<string,Camera>();
        private Camera CameraDebug = null;

        private Camera m_oCurrentCamera = null;
        public Camera CameraCurrent
        {
            get
            {
                return m_oCurrentCamera;
            }
            set
            {
                m_oCurrentCamera = value;
            }
        }

        public static CameraManager GetInstance()
        {
            if (m_oInstance == null)
            {
                m_oInstance = new CameraManager();
            }
            return m_oInstance;
        }

        public CameraManager()
        {
            CameraDebug = new Camera("Debug");
#if DEBUG
            CameraCurrent = CameraDebug;
#endif
        }

        public void AddCamera(string _ID)
        {
            Cameras.Add(_ID, new Camera(_ID));
        }

        public void AddCamera(string _ID, Vector2 _pos)
        {
            Cameras.Add(_ID, new Camera(_pos, _ID));
        }
    }
}
